#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <fstream>
#include <stdlib.h>
#include <map>
#include <stack>
#include <algorithm>
using namespace std;
///ModelCreate
int turn_id(string s);
void init_state(string f1, string f2);
///GrammerTree
typedef struct expression Expression, * PExpression;
void Tree_set_line(string buff);
bool is_atom(char ch);
static PExpression parse_expr();
void Visit(PExpression Tree);
void Print_PreOreder(PExpression Tree);
void Print_MiddleOreder(PExpression Tree);
void Print_PostOreder(PExpression Tree); 
void print_formula_by_number(PExpression Tree, int target_number);
void ModelPrint();
//ModelAlgorithm

